package com.original.simuladoresws.ws;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;

import com.original.simuladoresws.controller.FixedIncomeCalculateController;
import com.original.simuladoresws.controller.FixedIncomeComparsionsGetListController;
import com.original.simuladoresws.controller.FixedIncomeController;
import com.original.simuladoresws.controller.ObjectSaveController;
import com.original.simuladoresws.controller.ObjectiveCalculateController;
import com.original.simuladoresws.controller.ObjectiveSimulationsGetListController;
import com.original.simuladoresws.controller.ProductController;
import com.original.simuladoresws.controller.ProfileController;
import com.original.simuladoresws.entities.soap.SOAPBaseOutput;
import com.original.simuladoresws.entities.soap.SOAPFixedIncomeCalculateInput;
import com.original.simuladoresws.entities.soap.SOAPFixedIncomeCalculateOutput;
import com.original.simuladoresws.entities.soap.SOAPFixedIncomeComparsionsGetListInput;
import com.original.simuladoresws.entities.soap.SOAPFixedIncomeComparsionsGetListOutput;
import com.original.simuladoresws.entities.soap.SOAPFixedIncomeSaveInput;
import com.original.simuladoresws.entities.soap.SOAPObjectSaveInput;
import com.original.simuladoresws.entities.soap.SOAPObjectiveCalculateInput;
import com.original.simuladoresws.entities.soap.SOAPObjectiveCalculateOutput;
import com.original.simuladoresws.entities.soap.SOAPObjectiveSimulationsGetListInput;
import com.original.simuladoresws.entities.soap.SOAPObjectiveSimulationsGetListOutput;
import com.original.simuladoresws.entities.soap.SOAPProduct;
import com.original.simuladoresws.entities.soap.SOAPProfile;

@WebService(serviceName = "/SimuladoresWebServices")
@SOAPBinding(style = Style.RPC, use = Use.LITERAL)
public class SimuladoresWebServices {

	FixedIncomeCalculateController fixedIncomeCalculateController = new FixedIncomeCalculateController();

	@WebMethod(operationName = "fixedIncomeCalculate")
	public SOAPFixedIncomeCalculateOutput fixedIncomeCalculate(
			SOAPFixedIncomeCalculateInput input) {
		return fixedIncomeCalculateController.fixedIncomeCalculate(input);
	}

	FixedIncomeComparsionsGetListController fixedIncomeComparsionsGetListController = new FixedIncomeComparsionsGetListController();

	@WebMethod(operationName = "fixedIncomeComparsionsGetList")
	public SOAPFixedIncomeComparsionsGetListOutput fixedIncomeComparsionsGetList(
			SOAPFixedIncomeComparsionsGetListInput input) {
		return fixedIncomeComparsionsGetListController.fixedIncomeComparsionsGetList(input);
	}

	FixedIncomeController fixedIncomeController = new FixedIncomeController();

	@WebMethod(operationName = "fixedIncomeSave")
	public SOAPBaseOutput fixedIncomeSave(SOAPFixedIncomeSaveInput input) {
		SOAPBaseOutput output = null;
		if (input != null) {
			output = fixedIncomeController.fixedIncomeSave(input);
		}
		return output;
	}

	ObjectiveCalculateController objectiveCalculateController = new ObjectiveCalculateController();

	@WebMethod(operationName = "objectiveCalculate")
	public SOAPObjectiveCalculateOutput objectiveCalculate(
			SOAPObjectiveCalculateInput input) {
		return objectiveCalculateController.getObjectiveCalculate(input);
	}

	ObjectSaveController objectSaveController = new ObjectSaveController();

	@WebMethod(operationName = "objectiveSave")
	public SOAPBaseOutput objectiveSave(SOAPObjectSaveInput input) {
		return objectSaveController.objectiveSave(input);
	}

	ObjectiveSimulationsGetListController objectiveSimulationsGetListController = new ObjectiveSimulationsGetListController();

	@WebMethod(operationName = "objectiveSimulationsGetList")
	public SOAPObjectiveSimulationsGetListOutput objectiveSimulationsGetList(
			SOAPObjectiveSimulationsGetListInput input) {
		return objectiveSimulationsGetListController.objectiveSimulationsGetList(input);
	}

	ProductController productController = new ProductController();

	@WebMethod(operationName = "productGetList")
	public SOAPProduct productGetList() {
		return productController.getListActiveProducts();
	}

	ProfileController profileController = new ProfileController();

	@WebMethod(operationName = "suitabilityGetList")
	public SOAPProfile suitabilityGetList() {
		return profileController.suitabilityGetList();
	}
}
